package com.example.dytest.config;

import com.baomidou.dynamic.datasource.processor.DsProcessor;
import com.baomidou.dynamic.datasource.processor.DsSessionProcessor;
import com.baomidou.dynamic.datasource.processor.DsSpelExpressionProcessor;
import com.example.dytest.processor.DsHeaderProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyDynamicDataSourceConfig{

//   @Bean
//   public DsProcessor dsProcessor() {
//        DsHeaderProcessor headerProcessor = new DsHeaderProcessor();
//        DsSessionProcessor sessionProcessor = new DsSessionProcessor();
//        DsSpelExpressionProcessor spelExpressionProcessor = new DsSpelExpressionProcessor();
//        headerProcessor.setNextProcessor(sessionProcessor);
//        sessionProcessor.setNextProcessor(spelExpressionProcessor);
//        return headerProcessor;
//   }
}
